package com.rj.data.task;

import com.rj.data.sink.Sink;
import com.rj.data.source.Source;
import com.rj.data.task.Task;
import lombok.Builder;
import lombok.Data;

import java.util.List;
import java.util.concurrent.Callable;

/**
 * 多线程任务基类
 *
 * @param <T>
 */
@Data
public abstract class CallableTask<T> extends Task<T> implements Callable {


    public CallableTask(Source source, List<Sink> sinks) {
        super(source, sinks);
    }

    @Override
    public T call() throws Exception {
        return runTask();
    }


}
